import request from '/@/request/https'
import { AxiosPromise } from 'axios'

export interface submitParam {
    credential: string
}


// 保单检视系统接口
export function login(data): AxiosPromise {
    return request({
        url:"/login",
        method: 'post',
        data
    })
}

// 模拟联合登陆
export function Jlogin(data): AxiosPromise {
  return request({
    url: "/jointLogin",
    method: 'post',
    data
  })
}

// 保单验证码
export function loginCode(): AxiosPromise {
    return request({
        url:"/captchaImage",
        method: 'get'
    })
}

// 修改密码
export function changePassword(data): AxiosPromise {
    return request({
        url:`/system/user/profile/updatePwd?oldPassword=${data.q}&newPassword=${data.z}&intPasswordStatus=${data.intPasswordStatus}&username=${data.username}`,
        method: 'put'
    })
}


// 报告列表
export function selectTaskReportList(data): AxiosPromise {
    return request({
        url:"/policyReportQuery/selectTaskReportList",
        method: 'post',
        data
    })
}

// 解锁报告
export function nock(data): AxiosPromise {
    return request({
        url:"/policyReportQuery/unlock",
        method: 'post',
        data
    })
}

// 报告列表消费者
export function selectTaskReportListByConsumer(data): AxiosPromise {
    return request({
        url:"/policyReportQuery/selectTaskReportListByConsumer",
        method: 'post',
        data
    })
}

// 报告列表输入验证码
export function validateAuthorizationCode(data): AxiosPromise {
    return request({
        url:"/sharingAuthorization/validateAuthorizationCode",
        method: 'post',
        data
    })
}

// 报告列表输入验证码
export function validateAuthorizationCodeWithAgent(data): AxiosPromise {
    return request({
        url:"/sharingAuthorization/validateAuthorizationCodeWithAgent",
        method: 'post',
        data
    })
}